package com.shortlink.admin.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.shortlink.admin.dto.req.shortlink.ShortLinkCreateReqDTO;
import com.shortlink.common.base.Result;
import com.shortlink.common.base.Results;

/**
 * 自定义流控策略
 *
 * @author wp
 */
public class CustomBlockHandler {

    public static Result<Void> createShortLinkBlockHandlerMethod(ShortLinkCreateReqDTO requestParam, BlockException exception) {
        return Results.failure("B100000", "当前访问网站人数过多，请稍后再试...");
    }
}